# Include headers
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/tools/CGAL/)

# Include CGAL
SET(BACKUP_CXX_FLAGS ${CMAKE_CXX_FLAGS})
INCLUDE(${CGAL_USE_FILE})
SET(CMAKE_CXX_FLAGS ${BACKUP_CXX_FLAGS})

# Include boost
INCLUDE_DIRECTORIES(${BOOST_INCLUDE_DIRS})

# Enumerate source files
FILE(GLOB TEST_SRC_FILES unit_test_driver.cpp)
FILE(GLOB TEST_INC_FILES *_test.h)

ADD_EXECUTABLE(cgal_tests ${TEST_SRC_FILES} ${TEST_INC_FILES})
TARGET_LINK_LIBRARIES(cgal_tests Mesh cgal_wrapper ${GTEST_BOTH_LIBRARIES})
ADD_CUSTOM_COMMAND(TARGET cgal_tests POST_BUILD COMMAND cgal_tests)
